import {RowData} from '@/view/system/menu/MenuType'

export interface UmsLoginReq {
  username: string
  password: string
  code: string
  uuid: string
}
export interface UserType {
  id: number
  status: number
  login_time: string
  create_time: string
  note: string
  nick_name: string
  email: string
  icon: string
  password: string
  username: string
  user_phone: string
}
export interface UmsLoginRes {
  token: string
  user: UserType
}

export interface UmsPassReq {
  oldPassword: string
  newPassword: string
}

export interface UmsMenuReq {
  menu_hidden: "0" | "1"
  menu_name: string
  menu_type: "0" | "1" | "2"
  order: number
  parent_id: string
  path: string
  url: string
}
export interface UmsMenuUpdateReq extends RowData {}

export interface UmsMenuListListRes {
  id: number
  menu_hidden: string
  menu_icon: string| null
  menu_id: string
  menu_name: string
  menu_order: number
  menu_path: string
  menu_remark: string
  menu_type: string
  menu_url: string
  parent_id: string
}
export interface UmsparentListRes extends UmsMenuListListRes{
  children?: UmsparentListRes[]
}

export interface UmsListReq<T>{
  current: number
  pageSize: number
  data:T
}

export interface UmsMenuListRes{
  current: number
  pageSize: number
  total: number
  list: UmsMenuListListRes[]
}


export interface UmsListType<T> {
  current: number
  pageSize: number
  total: number
  list: T
}
